import React, { Component } from 'react';
import 'lodash';
import RouterMap from './router/index';
import Header from './components/header/header'
import Footer from './components/footer/footer'
import Loading from '@plugins/loading'
import 'antd/dist/antd.css';  
import '@style/common.css';
import '@font/iconfont.css';

class App extends Component {
    constructor(){
        super(...arguments);
        
        this.state = {
            loading: true
        }
    }

    componentDidMount() {
        
        setTimeout(() => {
            this.setState({
                loading: false
            })
        }, 2000)
    }

    render() {
        const { loading } = this.state;
        return(
            <div>
                {
                    loading ? <Loading /> : null
                }
                <Header />
                <RouterMap />
                <Footer />
            </div>
        )
    }
}

export default App